package com.wgy.day8;

/**
 * Created by pc on 2020/11/4 22:21
 * Description: Demo
 */
public class Demo02MethodOverloadSame {
    public static void main(String[] args) {
        same(5, 10);
        same(10L, 20);
        same((short) 6, (short) 6);
        same((byte) 9, (byte) 9);
    }

    public static void same(byte a, byte b) {
        boolean c = a == b;
        System.out.println(c);
        System.out.println("两个byte参数的方法执行啦");

    }

    public static void same(short a, short b) {
        boolean c = a == b;
        System.out.println(c);
        System.out.println("两个short参数的方法执行啦");

    }

    public static void same(long a, long b) {
        boolean c = a == b;
        System.out.println(c);
        System.out.println("两个long参数的方法执行啦");

    }

    public static void same(int a, int b) {

        System.out.println(a == b);
        System.out.println("两个int参数的方法执行啦");

    }
}
